﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Validator Page</title>
    <script type="text/javascript">
        function checkEmail() {
            var password = document.getElementById("password");
            var retypedpassword = document.getElementById("retypedpassword");
            //check if required fields have value
            if (true) {
                if (password.value !== retypedpassword.value) {
                    alert("Password does not match");
                    //location.reload(true);
                }
            }
        }
    </script>
</head>
<body>
    <form> Account Information
        <p><label>Username <input name="name" required ="true" /></label></p>
        <p><label>Password <input id="password" name ="password" type="password" required="true" /></label></p>
        <p><label>Repeat Password <input id="retypedpassword" name ="retypedpassword" type="password" required="true" /></label></p>
        <p><label>Email <input name="email" type="email" required="true" /></label></p>
        <p><label>Repeat Email <input name="retypedemail" type="email" required="true" /></label></p>
        <p><label>url <input name="url" type="url" required="true" /></label></p>
        <p><input type=submit value="Validate and Submit" onclick="checkEmail()" /></p>
    </form>
</body>
</html>
